//
// Created by madison on 2022/6/29.
//

#include <vector>

using namespace std;

class Solution {
public:
    void reverseString(vector<char> &s) {
        int n = s.size();
        for (int left = 0, right = n - 1; left < right; ++left, --right) {
            swap(s[left], s[right]);
        }
    }
};

int main() {
    Solution solution;
    vector<char> s = {'h', 'e', 'l', 'l', 'o'};
    solution.reverseString(s);
    for (int i = 0; i < s.size(); ++i) {
        printf("%c", s[i]);
    }
    return 0;
}